package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.util.List;
import java.util.Objects;

@Entity
@Table(name = "qmenu_from", schema = "springboot", catalog = "")
public class QmenuFrom {
    private int meId;
    private String mePath;
    private String meName;
    private String meIcon;
    private QmenusEntity menusId;
    private List<QmenuFrom> requireAuth;
    private String meisNota;
    private Integer meTopid;

    @Id
    @Column(name = "me_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getMeId() {
        return meId;
    }

    public void setMeId(int meId) {
        this.meId = meId;
    }

    @Basic
    @Column(name = "me_path")
    public String getMePath() {
        return mePath;
    }

    public void setMePath(String mePath) {
        this.mePath = mePath;
    }

    @Basic
    @Column(name = "me_name")
    public String getMeName() {
        return meName;
    }

    public void setMeName(String meName) {
        this.meName = meName;
    }

    @Basic
    @Column(name = "me_icon")
    public String getMeIcon() {
        return meIcon;
    }

    public void setMeIcon(String meIcon) {
        this.meIcon = meIcon;
    }

    @ManyToOne
    @JoinColumn(name = "menus_id",referencedColumnName = "menus_id")
    public QmenusEntity getMenusId() {
        return menusId;
    }

    public void setMenusId(QmenusEntity menusId) {
        this.menusId = menusId;
    }


    @OneToMany(mappedBy = "meId")
    public List<QmenuFrom> getRequireAuth() {
        return requireAuth;
    }

    public void setRequireAuth(List<QmenuFrom> requireAuth) {
        this.requireAuth = requireAuth;
    }

    @Basic
    @Column(name = "meis_nota")
    public String getMeisNota() {
        return meisNota;
    }

    public void setMeisNota(String meisNota) {
        this.meisNota = meisNota;
    }


    @Basic
    @Column(name = "me_topid")
    public Integer getMeTopid() {
        return meTopid;
    }

    public void setMeTopid(Integer meTopid) {
        this.meTopid = meTopid;
    }

    @Override
    public String toString() {
        return "QmenuFrom{" +
                "meId=" + meId +
                ", mePath='" + mePath + '\'' +
                ", meName='" + meName + '\'' +
                ", meIcon='" + meIcon + '\'' +
                ", menusId=" + menusId +
                ", meisNota='" + meisNota + '\'' +
                '}';
    }


}
